import Logo from '../components/Logo'
import Forget from '../components/Forget'
import MyLayout from '../layout/MyLayout';
import ProjectMange from '../components/projectMange/ProjectMange';
import {
  Navigate
} from 'react-router-dom'
import menu from './menu'
import Register from '../components/Register'
// const modules = import.meta.glob('./*.jsx')
const routes = [
  {
    path: '/',
    element: <Navigate to='/login' />
  },
  {
    path: '/login',
    element: <Logo></Logo>
  },
  {
    path: '/froget',
    element: <Forget></Forget>
  },
  {
    path: "/register",
    element: <Register></Register>
  },
  {
    path: '/home',
    element: <MyLayout></MyLayout>,
    children: [
      {
        path: '',
        element: <Navigate to="property/buildings" />
      },
      {
        path: 'promange',
        element: <ProjectMange></ProjectMange>
      },
      ...menu]
  },
]

export default routes